﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Plugins.aspx.cs" Inherits="Cms.Web.UI.Admin.Plugins" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" href="Admin/Css/List.css" type="text/css" />
    <script language="javascript">
        //<![CDATA[
        function initPluginList() {
            cms.Lists.Init("pluginPane", preparePluginPopup);
        }

        function preparePluginPopup(trigger, id, name, e) {
            if (id.substring(0, 1) == "P")
                return;
            var popup = document.getElementById("pnlPluginPopup");
            var hlTemplates = document.getElementById("hlTemplates");
            hlTemplates.href = "Admin/PluginTemplates.aspx?id=" + id.substring(1);
            document.getElementById("ctl00_body_hidSelectedPluginID").value = id;
            cms.Lists.CurrentName = name;
            cms.Lists.ShowPopup(popup, trigger, "left", 0, 0, true, e);
        }
        //]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="buttons" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="body" runat="server">
    <asp:Literal ID="litIcon" runat="server" Visible="false" Text="Admin/Img/Icons/plugin.png" />
    <div id="pluginPane" style="position: relative;">
        <asp:UpdatePanel ID="upnlPlugins" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
            <ContentTemplate>
                <asp:Panel ID="pnlActions" runat="server" />
                <table class="list" id="tblPlugins">
                    <tr>
                        <th><cms:LocalizedLiteral ID="llNameHeader" runat="server" /></th>
                        <th><cms:LocalizedLiteral ID="llDescriptionHeader" runat="server" /></th>
                        <th><cms:LocalizedLiteral ID="llTemplatableHeader" runat="server" /></th>
                        <th><cms:LocalizedLiteral ID="llTemplatesHeader" runat="server" /></th>
                    </tr>
                    <asp:Repeater ID="rpPlugins" runat="server" OnItemDataBound="rpPlugins_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td><asp:Literal ID="litID" runat="server" /><img src="Admin/Img/icons/plugin.png" /><span><asp:literal ID="litName" runat="server" /></span></span></td>
                                <td><asp:Literal ID="litDescription" runat="server" /></td>
                                <td><asp:Literal ID="litTemplatable" runat="server" /></td>
                                <td><asp:Literal ID="litTemplates" runat="server" /></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div id="pluginPaneOverlay" class="paneOverlay"></div>
        <div id="pluginPaneOverlayProgress" class="paneOverlayProgress"><img src="Admin/img/progress.gif" /></div>
    </div>
    <asp:UpdatePanel ID="upnlActions" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <div id="pnlPluginPopup" class="popup">
                <div class="popupMenuTop">
                    <div class="popupMenuTopBg">&nbsp;</div>
                    <div class="popupMenuTopLeftCorner">&nbsp;</div>
                    <div class="popupMenuTopRightCorner">&nbsp;</div>
                </div>
                <div class="popupMenu">
                    <div class="popupMenuLeftBg">&nbsp;</div>
                    <div class="popupMenuRightBg">&nbsp;</div>
                    <div class="popupMenuContent">
                        <a id="hlTemplates" href="#"><img src="Admin/Img/icons/plugin_template.png" /><span><cms:LocalizedLiteral ID="llTemplates" runat="server" /></span></a>
                    </div>
                </div>
                <div class="popupMenuBottom">
                    <div class="popupMenuBottomBg">&nbsp;</div>
                    <div class="popupMenuBottomLeftCorner">&nbsp;</div>
                    <div class="popupMenuBottomRightCorner">&nbsp;</div>
                </div>
            </div>
            <input type="hidden" id="hidSelectedPluginID" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <script language="javascript">
        iLib.Dom.AddListener(window, "load", initPluginList);
        cms.Ajax.Init();
        cms.Ajax.AddEndRequestHandler(cms.Lists.HidePaneOverlays);
    </script>
</asp:Content>
